package com.wl.common.system.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.wl.common.mybatis.model.AbstractBaseDeleteModel;
import com.wl.common.core.constant.ConstantSystem;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Table;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * @author: wanglin
 * @date: 2023-09-13 周三
 * @Version: 1.0
 * @Description:
 */
@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = true)
@Entity(name = SysRoleMenu.TABLE_NAME)
@Table(appliesTo = SysRoleMenu.TABLE_NAME, comment = "角色菜单表")
@TableName(value = SysRoleMenu.TABLE_NAME)
public class SysRoleMenu extends AbstractBaseDeleteModel {
    public static final String TABLE_NAME = ConstantSystem.TABLE_PREFIX + "role_menu";

    @Column(columnDefinition = "varchar(32) comment '菜单id'")
    private String menuId;
    @Column(columnDefinition = "varchar(32) comment '角色id'")
    private String roleId;

    public SysRoleMenu(String roleId, String menuId) {
        this.roleId = roleId;
        this.menuId = menuId;
    }
}
